@extends('layouts.app')
@section('content')
<div class="jumbotron">
  <div class="container">
    <h1>Hello, world! <a class="btn btn-primary btn-lg pull-right" href="#" role="button">Learn more</a></h1>
  </div>
</div>
<div class="container">
  <div class="row">
    <div class="col-md-9" role="mian">
      @foreach($discussions as $discussion)
        <div class="media">
          <div class="media-left">
            <a href="#">
              <img class="media-object img-circle"  alt="64*64" src="{{ $discussion->user->avatar }}">
            </a>
          </div>
          <div class="media-body">
            <h4 class="media-heading"><a href="{{ url('post/show/'.$discussion->id) }}">{{ $discussion->title }}</a></h4>
            {{ $discussion->user->name }}
          </div>
        </div>
      @endforeach
      {{ $discussions->links() }}
    </div>
  </div>
</div>  

@endsection
